package top.infopub.util;

import top.infopub.enums.bpa.BpaProcessDetailTypeEnum;
import top.infopub.enums.cap.CapProcessDetailTypeEnum;
import top.infopub.enums.fia.FiaProcessDetailTypeEnum;
import top.infopub.enums.mkt.ProProcessDetailTypeEnum;
import top.infopub.model.mkt.ProjectInfo;

public class UtilTools {
    /**
     * 市场-OA待办标题
     * @param proInfo
     * @param ppdt
     * @return
     */
    public static String getMktOaTitle(ProjectInfo proInfo, ProProcessDetailTypeEnum ppdt) {
        StringBuffer oaTitle = new StringBuffer();
        oaTitle.append(proInfo.getProName());
        oaTitle.append("-");
        oaTitle.append(ppdt.getNodeName());
        return oaTitle.toString();
    }

    /**
     * 融资-OA待办标题
     * @param proName
     * @param cpdt
     * @return
     */
    public static String getCapOaTitle(String proName, CapProcessDetailTypeEnum cpdt) {
        StringBuffer oaTitle = new StringBuffer();
        oaTitle.append(proName);
        oaTitle.append("-");
        oaTitle.append(cpdt.getNodeName());
        return oaTitle.toString();
    }

    /**
     * 财务-OA待办标题
     * @param proName
     * @param fpdt
     * @return
     */
    public static String getFiaOaTitle(String proName, FiaProcessDetailTypeEnum fpdt) {
        StringBuffer oaTitle = new StringBuffer();
        oaTitle.append(proName);
        oaTitle.append("-");
        oaTitle.append(fpdt.getNodeName());
        return oaTitle.toString();
    }

    /**
     * 商务-OA待办标题
     * @param proName
     * @param cpdt
     * @return
     */
    public static String getBpaOaTitle(String proName, BpaProcessDetailTypeEnum cpdt) {
        StringBuffer oaTitle = new StringBuffer();
        oaTitle.append(proName);
        oaTitle.append("-");
        oaTitle.append(cpdt.getNodeName());
        return oaTitle.toString();
    }
}
